package com.sun.module_hot.ui

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.material3.Button
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.sun.module_common.route.RouteName
import com.sun.module_common.route.RouteUtils


/**
 *@author:sunc
 *@time :2025/7/29 16:57
 *@desc: 描述 热门
 */

@Preview(showBackground = true)
@Composable
fun HotScreen(modifier: Modifier = Modifier) {
    val list = listOf("json动画")

    Column(
        modifier = modifier
            .fillMaxSize()
//            .background(MaterialTheme.colorScheme.primary)
            .wrapContentSize(Alignment.Center)
            .padding(horizontal = 16.dp)
    ) {
        list.forEach {
            Button(
                onClick = { RouteUtils.navigateTo(RouteName.Animation) },
                modifier = Modifier.fillMaxWidth()
            ) {
                Text(
                    text = it,
                    fontWeight = FontWeight.Bold,
                    color = Color.White,
                    textAlign = TextAlign.Center,
                    fontSize = 25.sp
                )
            }
        }

    }
}
